project(wudong LANGUAGES CXX)


file (GLOB wu_headerFiles ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h)
file (GLOB wu_sourceFiles ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
file (GLOB rm_sourceFiles ${CMAKE_CURRENT_SOURCE_DIR}/RealisticMouse/*.*)

find_package(OpenCV REQUIRED)

find_package(jsoncpp CONFIG REQUIRED)

# set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)  # 自动生成DLL导出符号

add_library(wudong STATIC
    ${wu_headerFiles}
    ${wu_sourceFiles} 
    ${rm_sourceFiles}
    )

target_include_directories(wudong PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}/include
    ${CMAKE_CURRENT_SOURCE_DIR}/RealisticMouse
    ${VCPKG_INCLUDE_DIR}
)

    
target_link_libraries(wudong PUBLIC    
    ${OpenCV_LIBS}
    JsonCpp::JsonCpp
    # Windows 系统库（静态链接必需）
    $<$<PLATFORM_ID:Windows>:
        advapi32 
        user32 
        gdi32 
    >
    # IlmImf libjpeg-turbo libwebp libpng libtiff libopenjp2
 ) 
 


  